//
//  Electric.m
//  OC03_继承_初始化方法_遍历构造器
//
//  Created by Scott on 16/4/20.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "Electric.h"

@implementation Electric



#pragma mark - Creating and Init
- (instancetype)initWithBrand:(NSString *)brand price:(float)price color:(NSString *)color comfortableStar:(float)comfortableStar {
    
    self = [super init];
    if (self) {
        
        _brand = brand;
        _price = price;
        _color = color;
        _comfortableStar = comfortableStar;
        
    }
    
    return self;
}


+ (instancetype)electricWithBrand:(NSString *)brand price:(float)price color:(NSString *)color comfortableStar:(float)comfortableStar {
    
    return [[Electric alloc] initWithBrand:brand price:price color:color comfortableStar:comfortableStar];

}

@end
